package com.eshop.we.common;

import java.io.PrintWriter;
import java.io.Writer;

public class RepPrintWriter extends PrintWriter{
	private StringBuilder buffer;

	RepPrintWriter(Writer out,StringBuilder sb) {
		super(out);
		buffer = sb;
	}

	@Override
	public void write(char[] buf, int off, int len) {
		char[] dest = new char[len];
		System.arraycopy(buf, off, dest, 0, len);
		buffer.append(dest);
	}

	@Override
	public void write(char[] buf) {
		super.write(buf);
	}

	@Override
	public void write(int c) {
		super.write(c);
	}

	@Override
	public void write(String s, int off, int len) {
		super.write(s, off, len);
	}

	@Override
	public void write(String s) {
		super.write(s);
	}
}
